# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Charles Mauch <cmauch@gmail.com>
# Contributor: Francois Charette <firmicus@gmx.net>

pkgname=perl-class-autouse
pkgver=2.01
pkgrel=5
pkgdesc="Run-time load a class the first time you call a method in it. "
arch=('any')
url="https://search.cpan.org/dist/Class-Autouse"
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/A/AD/ADAMK/Class-Autouse-$pkgver.tar.gz) 
sha256sums=('c05b3236c05719d819c20db0fdeb6d0954747e43d7a738294eed7fbcf36ecf1b')

build() {
  cd  "$srcdir"/Class-Autouse-$pkgver
  PERL_USE_UNSAFE_INC=1 \
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/Class-Autouse-$pkgver
  make pure_install doc_install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
